﻿#ifndef PLANADD_H
#define PLANADD_H

#include "itemadd.h"
#include <QSqlTableModel>

namespace Ui {
class PlanAdd;
}

class PlanAdd : public ItemAdd
{
    Q_OBJECT

public:
    explicit PlanAdd(QWidget *parent = 0);
    ~PlanAdd();

    bool saveIndex(const QString &customer, const QString &period,
                    const QString &remark);
    bool saveDetail(const QString &name, const QString &number,
                    const QString &request, const QString &remark);
    void updateView(const QString &uid);

private slots:
    void on_btn_submit_clicked();
    void on_btn_save_clicked();

private:
    Ui::PlanAdd *ui;

    QString detailTable;
    bool saveOk;
    QString _uid;
    QPair<QString,QString> pair;

    QSqlTableModel *model;
};

#endif // PLANADD_H
